package com.xdd.dao.database.mysql.impl;

import com.xdd.dao.database.BaseMapper;
import com.xdd.dao.database.mysql.UserDao;
import com.xdd.entity.User;
import org.springframework.stereotype.Repository;


/**
 * Created by hancongcong on 2018/11/29.
 */
@Repository
public class UserDaoImpl extends BaseMapper implements UserDao {

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return mysqlSessionTemplate.getMapper(UserDao.class).deleteByPrimaryKey(id);
    }

    @Override
    public int insert(User record) {
        return mysqlSessionTemplate.getMapper(UserDao.class).insert(record);
    }

    @Override
    public int insertSelective(User record) {
        return mysqlSessionTemplate.getMapper(UserDao.class).insertSelective(record);
    }

    @Override
    public User selectByPrimaryKey(Integer id) {
        return mysqlSessionTemplate.getMapper(UserDao.class).selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return mysqlSessionTemplate.getMapper(UserDao.class).updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return mysqlSessionTemplate.getMapper(UserDao.class).updateByPrimaryKeySelective(record);
    }
}
